package com.xfxz.merchant.view.login;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.xfxz.merchant.R;
import com.xfxz.merchant.view.MainView;
import com.xfxz.merchant.view.homepage.MainActivity;

public class LoginActivity extends AppCompatActivity  implements MainView,View.OnClickListener{
    private LinearLayout loginEditLayout;
    private TextView tvLoginRegister;
    private TextView tvLoginForgetpassword;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);
        initView();
    }

    private void initView() {
        loginEditLayout = (LinearLayout) findViewById(R.id.login_edit_layout);
        tvLoginRegister = (TextView) findViewById(R.id.tv_login_register);
        tvLoginForgetpassword = (TextView) findViewById(R.id.tv_login_forgetpassword);


        tvLoginRegister.setOnClickListener(this);
        tvLoginForgetpassword.setOnClickListener(this);


    }

    @Override
    public void setData(Object o) {

    }



    public void loginClick(View view) {
        startActivity(new Intent(this, MainActivity.class));
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.tv_login_register:
                startActivity(new Intent(this,RegisterActivity.class));
                break;
            case R.id.tv_login_forgetpassword:
                startActivity(new Intent(this,ForgetPasswordActivity.class));
                break;
        }
    }
}
